/*
 * *******************************************************************
 *   @项目名称: BHex Android
 *   @文件名称: OtcUserApi.java
 *   @Date: 19-1-14 上午10:49
 *   @Author: ppzhao
 *   @Description:
 *   @Copyright（C）: 2019 BlueHelix Inc.   All rights reserved.
 *   注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的.
 *  *******************************************************************
 */

package io.bhex.sdk.otc;

import io.bhex.baselib.network.BParamsBuilder;
import io.bhex.baselib.network.HttpUtils;
import io.bhex.baselib.network.listener.SimpleResponseListener;
import io.bhex.baselib.network.params.PostParams;
import io.bhex.baselib.network.response.ResultResponse;
import io.bhex.sdk.OTCUrls;
import io.bhex.sdk.otc.bean.OtcUserInfo;

public class OtcUserApi {
    /**
     * 获取otc用户信息
     * @param listener
     */
    public static void getOtcUserInfo(SimpleResponseListener<OtcUserInfo> listener){
        PostParams params = BParamsBuilder.post()
                .url(OTCUrls.OTC_USER_INFO)
//                .addParam("",)
                .build();
        HttpUtils.getInstance().request(params,OtcUserInfo.class,listener);
    }

    /**
     * OTC设置用户昵称
      * @param nickName
     * @param listener
     */
    public static void setOtcUserNickName(String nickName, SimpleResponseListener<ResultResponse> listener){
        PostParams params = BParamsBuilder.post()
                .url(OTCUrls.OTC_SET_NICKNAME)
                .addParam("nickName",nickName)
                .build();
        HttpUtils.getInstance().request(params,ResultResponse.class,listener);
    }
}
